﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using Sita.Presentation.Models;

namespace Sita.Presentation.Controllers
{
    public class DefaultController : Controller
    {
        public UserSession AuthenticatedUser
        {
            get
            {
                if (this.ControllerContext.HttpContext != null &&
                    this.ControllerContext.HttpContext.User != null &&
                    this.ControllerContext.HttpContext.User.Identity != null)
                {
                    //if (this.ControllerContext.HttpContext.User.Identity.IsAuthenticated)
                    //{
                    return (UserSession)Session["Account.UserSession"];
                    //}
                }
                return null;
            }
        }

    }
}
